*{
    margin: 0;
    padding: 0;
    user-select: none;
}

body{
    perspective: 1000px;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: linear-gradient(120deg, #40b3ff, #d97aff);
}

.card{
    position: relative;
    transform-style: preserve-3d;
    width: 300px;
    height: 45px;
    cursor: pointer;
    box-shadow: 1px 1px 20px rgba(0, 0, 0, 0.05);
}

.card:hover{
    animation: rotate cubic-bezier(.76, -0.51, .29, 1.5) 1s forwards;
}


.card_front, .card_back{
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-direction: column;
    border-radius: 30px;
    background-color: #fff;
}

.card_front{
    position: absolute;
}

.card_back{
    transform-style: preserve-3d;
    transform: rotateY(180deg);
}

@keyframes rotate{
    0%{
        transform: rotateY(0deg);
    }
    100%{
        transform: rotateY(180deg);
    }

}

@keyframes rotate-reverse{
    100%{
        transform: rotateY(0deg);
    }
    0%{
        transform: rotateY(180deg);
    }

}